﻿@namespace AntDesign.Boilerplate.Client.Components
@inherits AntDomComponentBase

<Space Class="@ClassMapper.Class">
    <SpaceItem>
        <HeaderSearch Class="action search"
                      Placeholder="站内搜索"
                      DefaultValue="umi ui"
                      Options="DefaultOptions" />
    </SpaceItem>
    <SpaceItem>
        <Tooltip Title="@("Help")" Placement="@PlacementType.Bottom">
            <span class="action">
                <Icon Type="question-circle" Theme="outline" />
            </span>
        </Tooltip>
    </SpaceItem>
    <SpaceItem>
        <NoticeIcon ClearText="清空"
                    ViewMoreText="查看更多"
                    Count="_count"
                    OnClear="HandleClear"
                    OnViewMore="HandleViewMore">
            <NoticeList TabKey="notification"
                        Title="通知"
                        EmptyText="你已查看所有通知"
                        ShowViewMore
                        Data="_notifications"/>
            <NoticeList TabKey="message"
                        Title="消息"
                        EmptyText="您已读完所有消息"
                        ShowViewMore
                        Data="_messages"/>
            <NoticeList TabKey="event"
                        Title="待办"
                        EmptyText="你已完成所有待办"
                        ShowViewMore
                        Data="_events"/>
        </NoticeIcon>
    </SpaceItem>
    <SpaceItem>
        <AuthorizeView>
            <Authorized>
                <AvatarDropdown Name="@_currentUser.Name"
                                Avatar="@_currentUser.Avatar"
                                OnItemSelected="HandleSelectUser" />
            </Authorized>
            <NotAuthorized>
                <a href="user/register">注册</a>
                <a href="user/login">登录</a>
            </NotAuthorized>
        </AuthorizeView>
    </SpaceItem>
    <SpaceItem>
        <SelectLang OnItemSelected="HandleSelectLang" />
    </SpaceItem>
</Space>
